function FindNumbersWithSum(array, sum)
{
    // write code here
    var l = 0
    var r = array.length - 1
    while(l < r){
      var curSum = array[l] + array[r]
      if(curSum === sum){
        return [array[l],array[r]]
      }else if(curSum > sum){
        r--
      }else{
        l++
      }
    }
    return []
}
module.exports = {
    FindNumbersWithSum : FindNumbersWithSum
};